Skip to content

feat: Allow custom selection of action buttons#169

Merged
itsarvinddev merged 1 commit into
itsarvinddev:masterfrom
sytzedewitte:feature/enabled-action-buttons
Oct 21, 2025
Merged

feat: Allow custom selection of action buttons#169
itsarvinddev merged 1 commit into
itsarvinddev:masterfrom
sytzedewitte:feature/enabled-action-buttons

Conversation

@sytzedewitte
Copy link
Copy Markdown
Contributor

@sytzedewitte sytzedewitte commented Oct 20, 2025

What

This PR fixes #167.

Why

Setting GalleryButtonType.none hides all action buttons (torch and camera switch included).
It was requested to implement a way to disable only the gallery button while keeping other controls visible.

How

Introduced a new ScannerAction enum and enabledActionButtons parameter, allowing users to specify exactly which icons should be displayed.
For example:

AiBarcodeScanner(
    galleryButtonType: GalleryButtonType.icon,
    enabledActionButtons: const {
      ScannerAction.cameraSwitch,
      ScannerAction.torch,
    },
    onDetect: (BarcodeCapture capture) {
      /// Do something with the barcode
    },
  )

…se which icons to display in new enabledActionButtons parameter
@sytzedewitte sytzedewitte changed the title feat(action-buttons): added ScannerAction enum to allow users to choo… Allow custom selection of action buttons Oct 20, 2025
@sytzedewitte sytzedewitte changed the title Allow custom selection of action buttons feat: Allow custom selection of action buttons Oct 20, 2025
@itsarvinddev itsarvinddev merged commit a32b160 into itsarvinddev:master Oct 21, 2025
1 of 2 checks passed
@itsarvinddev
Copy link
Copy Markdown
Owner

Thank you for your PR, @sytzedewitte. It was very helpful.

@sytzedewitte sytzedewitte deleted the feature/enabled-action-buttons branch October 21, 2025 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing torch/camera buttons

2 participants